'use strict';

module.exports = (app) => {
    const {DataTypes} = app.Sequelize;
    const Icon = app.model.define('icon', {
        id: { 
            type: DataTypes.UUID,
            defaultValue: app.Sequelize.UUIDV4, 
            primaryKey: true,
            notNull: true,
            comment: 'ID'
        },
        homeId: { 
            type: DataTypes.UUID,
            notNull: true,
            comment: 'homeId'
        },
        icon:{type: DataTypes.TEXT,notNull:true,comment: 'icon'},
        text:{type: DataTypes.STRING(10),notNull:true,comment: 'text'},
        order:{type: DataTypes.INTEGER,notNull:true,comment: 'text'},
    },
  );
  Icon.sync()
  return Icon;
};